From: achmafooma Date: Sat, 16 Apr 2016 01:21:42 +0000 (-0400) Subject: Correct record delimiter and add test for .upoi write X-Git-Tag: archive/raspbian/1.10.0+ds-2+rpi1~1^2~12^2~9^2~24^2~2 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=b531b7afdfea4be89d21f8874157894652badd65;p=gpsbabel.git Correct record delimiter and add test for .upoi write --- diff --git a/internal_styles.cc b/internal_styles.cc index 52fc36391..9352c4244 100644 --- a/internal_styles.cc +++ b/internal_styles.cc @@ -748,7 +748,7 @@ static char igoprimo_poi[] = "# FILE LAYOUT DEFINITIONS:\n" "#\n" "FIELD_DELIMITER PIPE\n" - "RECORD_DELIMITER CR\n" + "RECORD_DELIMITER CRNEWLINE\n" "BADCHARS \"|\n" "ENCODING UTF-16LE\n" "#\n" @@ -1490,7 +1490,7 @@ static char xmapwpt[] = "IFIELD DESCRIPTION, \"\", \"%-.78s\"\n" ; style_vecs_t style_list[] = {{ "xmapwpt", xmapwpt } , { "xmap2006", xmap2006 } , { "xmap", xmap } , { "tomtom_itn_places", tomtom_itn_places } , { "tomtom_itn", tomtom_itn } , { "tomtom_asc", tomtom_asc } , { "tabsep", tabsep } , { "saplus", saplus } , { "s_and_t", s_and_t } , { "ricoh", ricoh } , { "openoffice", openoffice } , { "nima", nima } , { "navigonwpt", navigonwpt } , { "mxf", mxf } , { "motoactv", motoactv } , { "mapconverter", mapconverter } , { "mainnav", mainnav } , { "land_air_sea", land_air_sea } , { "kompass_wp", kompass_wp } , { "kompass_tk", kompass_tk } , { "igo2008_poi", igo2008_poi } , { "igoprimo_poi", igoprimo_poi } , { "iblue757", iblue757 } , { "iblue747", iblue747 } , { "gpsman", gpsman } , { "gpsdrivetrack", gpsdrivetrack } , { "gpsdrive", gpsdrive } , { "geonet", geonet } , { "garmin_poi", garmin_poi } , { "garmin_g1000", garmin_g1000 } , { "garmin301", garmin301 } , { "fugawi", fugawi } , { "flysight", flysight } , { "dna", dna } , { "custom", custom } , { "cup", cup } , { "csv", csv } , { "cambridge", cambridge } , { "arc", arc } , {0,0}}; -size_t nstyles = 38; +size_t nstyles = 39; #else /* CSVFMTS_ENABLED */ style_vecs_t style_list[] = {{0,0}}; size_t nstyles = 0; diff --git a/reference/igoprimo_poi~upoi.csv b/reference/igoprimo_poi~upoi.csv deleted file mode 100644 index 3af994f90..000000000 --- a/reference/igoprimo_poi~upoi.csv +++ /dev/null @@ -1,7 +0,0 @@ -No,Latitude,Longitude,Name,Address,City,PostalCode,Phone -1,38.870741,-77.103000,"Cathedral of St Thomas More","Cathedral Ln","Arlington","22203","+(1)-(703)-5251300" -2,38.889742,-77.013587,"Capitol Reflecting Pool",,"District of Columbia",, -3,38.884787,-77.439315,"McDonald's","Brookfield Corporate Dr","Chantilly","20151", -4,38.952749,-77.447755,"Washington Dulles International Airport","Saarinen Cir","Sterling","20166","+(1)-(703)-5722700" -5,38.857596,-77.226819,"Inova Fairfax Medical Campus","Gallows Rd","Fairfax","22031","+(1)-(703)-7764001" -6,38.871771,-77.008025,"Nationals Park","S Capitol St SE","Washington","20003","+(1)-(888)-6326287" diff --git a/reference/igoprimo_poi~upoi.ucsv b/reference/igoprimo_poi~upoi.ucsv new file mode 100644 index 000000000..3af994f90 --- /dev/null +++ b/reference/igoprimo_poi~upoi.ucsv @@ -0,0 +1,7 @@ +No,Latitude,Longitude,Name,Address,City,PostalCode,Phone +1,38.870741,-77.103000,"Cathedral of St Thomas More","Cathedral Ln","Arlington","22203","+(1)-(703)-5251300" +2,38.889742,-77.013587,"Capitol Reflecting Pool",,"District of Columbia",, +3,38.884787,-77.439315,"McDonald's","Brookfield Corporate Dr","Chantilly","20151", +4,38.952749,-77.447755,"Washington Dulles International Airport","Saarinen Cir","Sterling","20166","+(1)-(703)-5722700" +5,38.857596,-77.226819,"Inova Fairfax Medical Campus","Gallows Rd","Fairfax","22031","+(1)-(703)-7764001" +6,38.871771,-77.008025,"Nationals Park","S Capitol St SE","Washington","20003","+(1)-(888)-6326287" diff --git a/style/igoprimo_poi.style b/style/igoprimo_poi.style index 36df8afa8..b53da5be4 100644 --- a/style/igoprimo_poi.style +++ b/style/igoprimo_poi.style @@ -11,7 +11,7 @@ DATATYPE WAYPOINT # FILE LAYOUT DEFINITIONS: # FIELD_DELIMITER PIPE -RECORD_DELIMITER CR +RECORD_DELIMITER CRNEWLINE BADCHARS "| ENCODING UTF-16LE # @@ -34,4 +34,4 @@ IFIELD IGNORE, "", "%s" # should be street number IFIELD IGNORE, "", "%s" # always empty? IFIELD PHONE_NR, "", "%s" IFIELD IGNORE, "", "%s" # always empty? -IFIELD IGNORE, "", "%s" # seems to be extra lat/lon values? \ No newline at end of file +IFIELD IGNORE, "", "%s" # seems to be extra lat/lon values? diff --git a/testo.d/igoprimo_poi.test b/testo.d/igoprimo_poi.test index 20ff0209c..e91df18c4 100644 --- a/testo.d/igoprimo_poi.test +++ b/testo.d/igoprimo_poi.test @@ -3,6 +3,7 @@ # gpsbabel -i igoprimo_poi -f ${REFERENCE}/igoprimo_poi.upoi -o gpx -F ${TMPDIR}/igoprimo_poi~upoi.gpx compare ${REFERENCE}/igoprimo_poi~upoi.gpx ${TMPDIR}/igoprimo_poi~upoi.gpx -gpsbabel -i igoprimo_poi -f ${REFERENCE}/igoprimo_poi.upoi -o unicsv -F ${TMPDIR}/igoprimo_poi~upoi.csv -compare ${REFERENCE}/igoprimo_poi~upoi.csv ${TMPDIR}/igoprimo_poi~upoi.csv - +gpsbabel -i igoprimo_poi -f ${REFERENCE}/igoprimo_poi.upoi -o unicsv -F ${TMPDIR}/igoprimo_poi~upoi.ucsv +compare ${REFERENCE}/igoprimo_poi~upoi.ucsv ${TMPDIR}/igoprimo_poi~upoi.ucsv +gpsbabel -i unicsv -f ${TMPDIR}/igoprimo_poi~upoi.ucsv -o igoprimo_poi -F ${TMPDIR}/igoprimo_poi~upoi~ucsv.upoi +compare ${REFERENCE}/igoprimo_poi.upoi ${TMPDIR}/igoprimo_poi~upoi~ucsv.upoi